import { createRouter, createWebHashHistory } from 'vue-router'
//import home from '../views/home.vue';
//import index from '../views/index.vue';
//import navHeader from '../layout/nav-header.vue';
//import navMenu from "../layout/nav-menu.vue";
//import tags from '../layout/tags.vue';

const routes = [
  {
    path: '/',
    name: 'index',
    redirect: '/home',
    component: () => import('../views/index.vue'),
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          title: '首页',
        },
        component: () => import('../views/home.vue'),
      },
      {
        path: '/node-list',
        name: 'node-list',
        meta: {
          title: '节点管理',
        },
        component: () => import('../../node-list/views/index.vue'),
      },
      {
        path: '/rule-template',
        name: 'rule-template',
        meta: {
          title: '规则模板',
        },
        component: () => import('../../rule-template/views/index.vue'),
      },
      {
        path: '/rule-management',
        name: 'rule-management',
        meta: {
          title: '规则管理',
        },
        component: () => import('../../rule-management/views/index.vue'),
      }
    ]
  }
  // {
  //   path: '/',
  //   name: 'tags',
  //   component: tags,
  // },
  // {
  //   path: "/about",
  //   name: "About",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../../../views/About.vue"),
  // },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})
export default router
